package com.gome.gop.data.entity.utils;

import com.gome.gop.common.Page;
import com.gome.gop.common.PageBaseBean;
import com.gome.gop.data.mapper.AbstractMapper;

import java.util.List;

/**
 * @Title:
 * @Description:
 * @Author:chengcheng7
 * @Since: 2022/10/3 13:08
 * @Copyright:Copyright (c) 2018 - 2100
 * @Company:gome
 * @Version:1.1.0
 */
public class PageUtils {

    public static Page page(AbstractMapper mapper, PageBaseBean pageBaseBean) {
        Page page = pageBaseBean.createPage();
        page.setRows(mapper.page(pageBaseBean, page));
        return page;
    }

    public static List query(AbstractMapper mapper, PageBaseBean pageBaseBean) {
        return mapper.page(pageBaseBean);
    }

}
